package com.ruicar.afs.cloud.finance.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.finance.common.entity.FinanceVirtualAccount;

import java.math.BigDecimal;

/**
 * <p>Description: </p>
 *
 * @author ZC.GUO
 * @version 1.0
 * @date create on 2020-07-02 10:18
 */
public interface FinanceVirtualAccountService extends IService<FinanceVirtualAccount> {

    /**
     * 收款金额分配时更新客户虚拟账户
     * @author ZC.GUO
     * @param virtualAccount 虚拟账户
     * @param amount 分配金额
     * @return
     */
    public void updateWhenDistribution(FinanceVirtualAccount virtualAccount, BigDecimal amount);

    /**
     * 针对单个虚拟账户进行余额分配处理
     * @author ZC.GUO
     * @param virtualAccount 虚拟账户
     * @return
     */
    public void handleUnusedFundsForOne(FinanceVirtualAccount virtualAccount);
    
}
